<?php @session_start();?>
<?php
require_once('./safe.php');
require_once('../admin/config.php');
$conn = mysql_connect($cfg_dbhost,$cfg_dbuser,$cfg_dbpwd);
mysql_select_db($cfg_dbname,$conn);
$sql="select * from ph_user where user_name='".$_SESSION["username"]."'";
$result=mysql_query($sql);
$row=mysql_fetch_array($result);
$sqltdk="select * from ph_tdk where 1=1";
$resulttdk=mysql_query($sqltdk);
$rowtdk=mysql_fetch_array($resulttdk);
?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

                    <link rel="apple-touch-icon" sizes="180x180" href="/images/iosinstalls/favicon/apple-touch-icon.png">

            <meta name="theme-color" content="#ffffff">

        <title><?php echo $rowtdk["sitename"];?> - Dashboard</title>

        <link href="../css/customer-iosinstalls.css?id=a9a9c5930bcdb195e9ee" rel="stylesheet">
        <link rel="stylesheet" type="text/css" href="<?php if(!empty($rowtdk["fontlink"])){echo '//fonts.googleapis.com/css?family='.$rowtdk["fontlink"];}else{echo "//fonts.googleapis.com/css?family=Roboto:300,400,500";}?>">
        <style type="text/css">
            body{font-family: '<?php echo $rowtdk["fontlink"];?>';}
        </style>
    </head>

    <body class="app header-fixed sidebar-fixed aside-menu-fixed aside-menu-hidden">
    <?php include("head.php");?> 
    <?php include("left.php");?>

            <!-- Main content -->
            <main class="main">
                    <div class="container-fluid padding-top">
        <div class="row">
            <div class="col-md-12">
                <div class="card">
                    <div class="card-header bg-primary">
                        <b>Transactions</b>
                    </div>
                    <div class="card-body">
                        <div class="table-responsive">
                            <table class="table table-hover mb-0">
                                <thead class="thead-default">
                                <tr>
                                    <th>Transaction ID</th>
                                    <th>Amount</th>
                                    <th>Payment Amount</th>
                                    <th>Date</th>
                                    <th>Type</th>
                                    <th></th>
                                </tr>
                                <?php 
$sqla="select * from ph_transactions where userid='".$_SESSION["userid"]."'";
$resulta=mysql_query($sqla);
while($rowa=mysql_fetch_array($resulta)){?>
    <tr>
                                    <td><?php echo $rowa["Transaction_ID"];?></td>
                                    <td><?php echo $rowa["Amount"];?></td>
                                    <td><?php echo $rowa["Payment_Amount"];?></td>
                                    <td><?php echo $rowa["cdate"];?></td>
                                    <td><?php echo $rowa["payType"];?></td>
                                    <td></td>
                                </tr>
    <?php }?>
                                </thead>
                                <tbody>
                                                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
            </main>
        </div>

        <footer class="app-footer">
                            &copy; 2021 <?php echo $rowtdk["sitename"];?>. All Rights Reserved
                        <div class="pull-right">
                Server time: <?php echo date('d-m-Y H:i:s',time());?>
            </div>
        </footer>

        <!-- Bootstrap and necessary plugins -->
        <script src="/js/backend.js?id=27298b157affa1f728a9"></script>

                        </body>
</html>